<%--
  Created by IntelliJ IDEA.
  User: 123456
  Date: 2023/4/9
  Time: 15:56
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<p>welcome : ${sessionScope.user.username}</p>
<hr>
<a href="/book/book.jsp">add book</a>
<table border="1">
    <tr>
        <th>title</th>
        <th>publish</th>
        <th>author</th>
        <th>publicationTime</th>
        <th>price</th>
        <th>cover</th>
        <th colspan="2">options</th>
    </tr>
    <c:forEach var="book" items="${sessionScope.books}">
        <tr>
            <th>${book.title}</th>
            <th>${book.publisher}</th>
            <th>${book.author}</th>
            <th>${book.publicationTime}</th>
            <th>${book.price}</th>
            <th>${book.cover}</th>
            <th><a href="/book/modifyById/${book.id}">MODIFY</a></th>
            <th><a href="/book/removeById/${book.id}">REMOVE</a></th>
            <th><a href="/book/queryDetail/${book.id}">DETAIL</a></th>
        </tr>
    </c:forEach>
</table>

</body>
</html>
